﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace IS_Ever_Green.DataAccess.Model
{
    public class UserModel
    {
        [Key]
        public int UserId { get; set; }

        public int RoleId { get; set; }

        [Required]
        public string LoginUser { get; set; } = string.Empty;

        [Required]
        public string FirstName { get; set; } = string.Empty;

        [Required]
        public string LastName { get; set; } = string.Empty;

        public string Email { get; set; } = string.Empty;

        public string NumberPhone { get; set; } = string.Empty;

        [Required]
        public string Password { get; set; } = string.Empty;

        public string DeliveryAddress { get; set; } = string.Empty;

        public byte[] PhotoUser { get; set; }

        [NotMapped]
        public string PhotoPath {  get; set; }


        public RoleModel Role { get; set; }
        public ICollection<CartModel> Carts { get; set; }
        public ICollection<OrderModel> Orders { get; set; }
        public ICollection<ReviewModel> Reviews { get; set; }
    }
}